package com.kgc.scd.service.impl;

import com.kgc.scd.bean.ArrivalUser;
import com.kgc.scd.bean.NotifyProArrive;
import com.kgc.scd.mapper.NotifyProArriveMapper;
import com.kgc.scd.service.NotifyProArriveService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created On : 2022/6/17.
 * <p>
 * Author     : nainai
 * <p>
 * Description: NotifyProArriveServiceImpl
 */
@Slf4j
@Service
public class NotifyProArriveServiceImpl implements NotifyProArriveService {

    @Autowired(required = false)
    private NotifyProArriveMapper notifyProArriveMapper;

    @Override
    public boolean modNotifyProArriveById(NotifyProArrive notifyProArrive) {
        return notifyProArriveMapper.updateByPrimaryKeySelective(notifyProArrive) > 0;
    }

    @Override
    public List<ArrivalUser> queryArrivalUserByProId(String proId) {
        log.info("开始查询订阅商品：{}到货的用户信息");

        return notifyProArriveMapper.selectArrivalUser(proId);

    }
}
